<?php

/**
 * Блок меню навигации по менеджерам текущей секции.
 *
 */
class Frontend_Block_Managers extends Kernel_Block {

    /**
     * Возвращает данные шаблона для формирования блока.
     *
     * @return  array
     */
    public function getData() {
        $managers = array();
        foreach (Frontend_Filter_Structure::$managers as $token) {
            list($module, $manager) = $token;
            $managers[] = array (
                  'name' => $module . '_' . $manager,
                'active' => Frontend_Filter_Structure::get('module') == $module && Backend_Filter_Structure::get('manager') == $manager,
                   'url' => array('module' => $module, 'manager' => $manager, 'token' => null),
            );
        }
        return array('managers' => $managers);
    }
}
